﻿

using System;
using System.Threading.Tasks;
using System.Linq.Expressions;

using Oliving.Edge.Model;
using Oliving.Edge.Model.Dto;
using Oliving.Edge.Model.Models;
using Oliving.Edge.IServices;
using Oliving.Edge.IRepository;
using Oliving.Edge.Services.BASE;
using Oliving.Edge.Model.School;

namespace Oliving.Edge.Services
{
    public partial class School_ExaminationServices : BaseServices<School_Examination>, ISchool_ExaminationServices
    {
        ISchool_ExaminationRepository _dal;
        public School_ExaminationServices(ISchool_ExaminationRepository dal)
        {
            this._dal = dal;
            base.BaseDal = dal;
        }

        public async Task<PageModel<School_ExaminationPageDto>> QueryPageList(Expression<Func<School_Examination, bool>> whereExpression,
            int pageIndex = 1, int pageSize = 20,
            string sortField = null, string sortOrder = null)
        {
            var page = await _dal.QueryPageData(
                whereExpression,
                pageIndex, pageSize,
                   sortField = null, sortOrder = null);
            return page;
        }

        //public async Task<PageModel<School_ExaminationPageDto>> QueryPageList(
        //    Expression<Func<School_Examination, bool>> whereExpression,
        //    int intPageIndex = 1,
        //    int intPageSize = 20,
        //    string strOrderByFileds = null)
        //    {
        //        var page = await _dal.QueryPageList(whereExpression, intPageIndex, intPageSize, strOrderByFileds);
        //        return page;
        //    } 


    }
}

